package com.fingerth.tinkerstudy.app

import android.app.Application
import android.content.Context
import android.content.Intent
import androidx.multidex.MultiDex
import com.fingerth.tinkerstudy.tinker.TinkerManager
import com.tencent.tinker.entry.DefaultApplicationLike
import com.tencent.tinker.lib.tinker.Tinker

class SampleApplicationLike(application: Application?, tinkerFlags: Int, tinkerLoadVerifyFlag: Boolean, applicationStartElapsedTime: Long, applicationStartMillisTime: Long, tinkerResultIntent: Intent?)  : DefaultApplicationLike(application, tinkerFlags, tinkerLoadVerifyFlag, applicationStartElapsedTime, applicationStartMillisTime, tinkerResultIntent) {


    override fun onCreate() {
        super.onCreate()
    }

    override fun onBaseContextAttached(base: Context?) {
        super.onBaseContextAttached(base)
        MultiDex.install(base)

        TinkerManager.setTinkerApplicationLike(this)
        TinkerManager.setUpgradeRetryEnable(true)
        TinkerManager.installTinker(this)
        Tinker.with(application)
    }

}